const app = getApp()
const clientApi = app.ClientApi
const clientGet = app.clientGet
import store from '../../utils/store'

Component({
    properties: {

    },
    data: {
        orderDetail: {},
    },
    methods: {
        async getOrder() {
            const factoryId = store.getItem("factoryId")
            const laneId = store.getItem('laneId')
            const orderData = await clientGet(`${clientApi.getOrderByLaneId}/factoryId/${factoryId}/laneId/${laneId}`)
            return orderData
        },

    },
    lifetimes: {
        async attached() {
            const orderDetail = await this.getOrder()
            this.setData({orderDetail})
        }
    }
});
